package po;

import java.io.Serializable;

import appendix.ResultMessage;

public class UserPO implements Serializable{
	protected int id = 0;
	protected String name = null;
	protected String password = null;
	protected String department = null;

	public UserPO(int id, String name, String password, String department) {
		this.id = id;
		this.name = name;
		this.password = password;
		this.department = department;
	}

	public int getID() {
		return id;
	}

	public void setID(int newID) {
		id = newID;
	}

	public String getName() {
		return name;
	}

	public void setName(String newName) {
		name = newName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String newPassword) {
		password = newPassword;
	}

	public String getDepartment() {
		return department;
	}

	public void setDepartment(String newDepartment) {
		department = newDepartment;
	}

	public String[] toList() {
		String[] result = new String[3];
		result[0] = id + "";
		result[1] = name;
		result[2] = department;
		return result;
	}
	
	public boolean isPassword(String password){
		boolean flag = false;
		if(this.password.equals(password)){
			flag = true;
		}
		return flag;
	}
	
	/*public ResultMessage<?> changePassword(String newPassword){
		return null;
	}*/
	
}
